package ch05_类与对象;

public class Ch5_3 {

	static void doNothing(){
		
	}
	public static void main(String[] args) {
		int a=2,b=4,c=6;
		long max;
		max=getMax(a,b);
		System.out.println("max(a,b)="+max+"   ");
		max = getMax(a*b,b);
		System.out.println("max(a*b,b)="+max+"   ");
		max=getMax((int) getMax(a,b*b),8+c);
		System.out.println("max(a,b*b,8+c)="+max);
		doNothing();
	}
	static long getMax(int a,long b) {
		if(a>b) {
			return a;
		}
		return b;
	}
}
